$(".reset,.start").click(function () {
    var act = $(this).attr('data-id');
    var class_name = $(this).attr('data-class');
    if(class_name=='reset'){
        var confirm_msg = "确认禁用图片吗?";
        var status = 2;
    }else{
        var confirm_msg = "确认启用图片吗?";
        var status = 1;
    }

    if (confirm(confirm_msg)) {
        $.ajax({
            url: '/banner/pictureStatus',
            type: 'POST',
            data: {status: status, act: act},
            dataType: 'JSON',
            cache: false,
            success: function (json) {
                dshow(json.message);
                if (json.code == 2000) {
                    window.location.href = '/banner/picture';
                }
            }
        });
    }
});

$(".update").click(function () {
    var id = $(this).attr('data-id');
    var page = $("input[name='page']").val();
    window.location.href = '/banner/save?page=' + page + '&id=' + id;
});

